﻿
@model Tuple<PhoneStoreWeb.Models.Product,PhoneStoreWeb.Models.PhoneTablet>
@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Product</legend>

        @Html.HiddenFor(model => model.Item1.ProductID)
        @Html.HiddenFor(model => model.Item2.PhoneTabletID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.CategoryID, "Category")
        </div>
        <div class="editor-field">
            @Html.DropDownList("CategoryID", String.Empty)
            @Html.ValidationMessageFor(model => model.Item1.CategoryID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.ManufacturerID, "Manufacturer")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ManufacturerID", String.Empty)
            @Html.ValidationMessageFor(model => model.Item1.ManufacturerID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.Name)
            @Html.ValidationMessageFor(model => model.Item1.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.Desciption)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.Desciption)
            @Html.ValidationMessageFor(model => model.Item1.Desciption)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.ProductImage)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.ProductImage)
            @Html.ValidationMessageFor(model => model.Item1.ProductImage)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.WarrantyTime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.WarrantyTime)
            @Html.ValidationMessageFor(model => model.Item1.WarrantyTime)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.DealerPrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.DealerPrice)
            @Html.ValidationMessageFor(model => model.Item1.DealerPrice)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.RetailPrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.RetailPrice)
            @Html.ValidationMessageFor(model => model.Item1.RetailPrice)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.Quantity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.Quantity)
            @Html.ValidationMessageFor(model => model.Item1.Quantity)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.IsHighlighted)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.IsHighlighted)
            @Html.ValidationMessageFor(model => model.Item1.IsHighlighted)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.IsNew)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.IsNew)
            @Html.ValidationMessageFor(model => model.Item1.IsNew)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.IsSelling)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.IsSelling)
            @Html.ValidationMessageFor(model => model.Item1.IsSelling)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.IsPromotional)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.IsPromotional)
            @Html.ValidationMessageFor(model => model.Item1.IsPromotional)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Item1.IsHidden)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Item1.IsHidden)
            @Html.ValidationMessageFor(model => model.Item1.IsHidden)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
